package com.qpf.mycms.api.exception.enums;

import com.baomidou.mybatisplus.annotation.IEnum;
import com.qpf.mycms.api.exception.constant.BusinessExceptionConstants;
import com.qpf.mycms.api.exception.constant.ClientExceptionConstants;
import com.qpf.mycms.api.exception.constant.ExceptionConstants;
import lombok.Getter;

@Getter
public enum BusinessExceptionEnum implements IEnum<Integer>  {
    BUSINESS_OPERATION_ERROR(ExceptionConstants.BUSINESS_EXCEPTION + ExceptionConstants.LEVEL_1_MACRO_ERROR_CODES, "系统内部错误, 请检查运行情况"),
    REGISTER_FAILED(ExceptionConstants.BUSINESS_EXCEPTION + BusinessExceptionConstants.CODES_REGISTER_FAILED, "注册失败"),
    ;
    private final Integer code;
    private final String desc;

    BusinessExceptionEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
